package cn.itcast.date.demo05.System;

import java.util.Arrays;

public class Demo01System {
    public static void main(String[] args) {
        demo01();
        demo02();
    }

    private static void demo02() {
        //复制数组元素到另一个数组
        //src
        int[] src = {1,2,3,4,5};
        //dest
        int[] dest = {6,7,8,9,10};
        System.out.println(Arrays.toString(dest));

        System.arraycopy(src,0,dest,0,3);
        System.out.println(Arrays.toString(dest));
    }

    private static void demo01() {
        //开始时间
        long s = System.currentTimeMillis();
        for (int i = 0; i < 99999; i++) {
            System.out.println(i);
        }
        long e = System.currentTimeMillis();
        System.out.println("耗时多少：" + (e-s) + "毫秒");

    }
}
